package Basic.day04;

import java.util.Scanner;

public class ScannerDemo {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int nextInt = sc.nextInt();// 读取下一个整数
        double nextDouble = sc.nextDouble();// 读取下一个双精度浮点数
        String nextString = sc.next();// 读取下一个字符串，直到遇到空格
        String line = sc.nextLine();// 读取一行输入，直到遇到换行符

        System.out.println("请输入年龄：");
        int age = sc.nextInt();
        System.out.println("请输入价格：");
        double price = sc.nextDouble();
        System.out.println("年龄为："+ age + "，价格是：" + price);
    }
}
